.editor-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}

.editor-modal {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #dee2e6;
  background: #f8f9fa;
  border-radius: 16px 16px 0 0;
}

.editor-header h2 {
  margin: 0;
  color: #333;
  font-size: 1.25rem;
}

.close-button {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6c757d;
  padding: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.close-button:hover {
  background: #e9ecef;
}

.editor-form {
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #333;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #ff6b9d;
  box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.type-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.5rem;
}

.type-option {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  padding: 1rem;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  transition: all 0.2s;
}

.type-option:hover {
  border-color: #ff6b9d;
  background: rgba(255, 107, 157, 0.05);
}

.type-option input[type="radio"] {
  margin-right: 0.75rem;
  margin-top: 0.25rem;
  width: auto;
}

.type-option input[type="radio"]:checked + .type-label {
  color: #ff6b9d;
}

.type-label {
  display: flex;
  flex-direction: column;
}

.type-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.type-desc {
  font-size: 0.875rem;
  color: #6c757d;
}

.tags-input {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tags-input input {
  flex: 1;
  margin: 0;
}

.tags-input button {
  background: #ff6b9d;
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.tags-input button:hover {
  background: #e55a87;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-item {
  background: #e9ecef;
  color: #495057;
  padding: 0.5rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.remove-tag {
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  width: 1rem;
  height: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.remove-tag:hover {
  background: #dc3545;
  color: white;
}

.add-image-button {
  background: #28a745;
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 1rem;
}

.add-image-button:hover {
  background: #218838;
}

.images-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.image-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 2px solid #dee2e6;
  border-radius: 8px;
}

.image-preview {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #dee2e6;
}

.image-url {
  flex: 1;
  font-size: 0.875rem;
  color: #6c757d;
  word-break: break-all;
}

.remove-image {
  background: #dc3545;
  color: white;
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
}

.remove-image:hover {
  background: #c82333;
}

.image-help {
  margin-top: 0.5rem;
}

.image-help small {
  color: #6c757d;
  font-style: italic;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #dee2e6;
}

.cancel-button {
  background: #6c757d;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
}

.cancel-button:hover {
  background: #5a6268;
}

.save-button {
  background: #ff6b9d;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
}

.save-button:hover {
  background: #e55a87;
}

@media (max-width: 768px) {
  .editor-overlay {
    padding: 1rem;
  }

  .editor-modal {
    max-height: 95vh;
  }

  .editor-header {
    padding: 1rem 1.5rem;
  }

  .editor-form {
    padding: 1.5rem;
  }

  .type-options {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .image-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .image-preview {
    align-self: center;
  }
}